Next | Prev | Up | Top | Contents | Index
Why Use the Subtexture Extension?
Using a subtexture is the fastest way to update only the image of a texture. When you need to redefine only the image of the texture and keep all other parameters, using subtexture is much faster than using the glTexImage*() call.
The subtexture extension is especially useful under the following circumstances:
- When you're dealing with an image that doesn't fit into texture memory, you can use the extension to load only parts of the texture and replace them as appropriate.
- When you're using video frames as textures, none of the common video formats (NTSC, PAL, SECAM, HD-TV, and so on) have height and width that's a power of 2. This is problematic because height and width of those dimensions is required for textures. You therefore create a NULL texture whose dimensions are larger than the video frame and then load the video frame as a subtexture.
- When you're working with an animation, loading a large texture may decrease the frame rate. Instead, load several subtextures over multiple frames to maintain a high frame rate.
Next | Prev | Up | Top | Contents | Index